package com.api.util;

import java.util.HashMap;
import java.util.Map;

/**
 * @packageName: com.api.util
 * @name: LogUtil
 * @description:
 * @author: 董定卓
 * @dateTime: 2019/6/20 15:24
 */
public class LogUtil {

    /**
     * 添加用户访问日志
     *
     * @param userId
     * @param uri
     * @param param
     * @return
     */
    public static Map<String, Object> addUserLog(Integer userId, String uri, String param) {
        Map<String, Object> logUserMap = new HashMap<>();
        logUserMap.put("userId", userId);
        logUserMap.put("uri", uri);
        logUserMap.put("param", param);
        logUserMap.put("createTime", DateUtil.currentSeconds());
        logUserMap.put("year", DateUtil.currentYearStr());
        logUserMap.put("month", DateUtil.currentYearMonthStr());
        logUserMap.put("day", DateUtil.currentDateStr());
        return logUserMap;
    }

}
